#-------------------------------------------------------------------
# This file is part of the CMake build system for MP Galaxy
#     (Multi Player Galaxy Game)
# For the latest info, see http://www.MPG3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------

####################################
#  MP-Galaxy BUILD SYSTEM 
#  Project: Logic
####################################

PROJECT(Logic)

set (HEADER_FILES
	Manager.h
	LogicHandlerThread.h
	Producer.h
	Types.h
)
set (SOURCE_FILES
	Manager.cpp
	LogicHandlerThread.cpp
	Producer.cpp
)

set (GAMESTATE_HEADER_FILES
	Gamestate/State.h
	Gamestate/StateFactory.h
)
set (GAMESTATE_SOURCE_FILES
	Gamestate/State.cpp
	Gamestate/StateFactory.cpp
)
set (GAMESTATE_STATE_HEADER_FILES
	Gamestate/States/CreditsState.h
	Gamestate/States/ExitState.h
	Gamestate/States/GameState.h
	Gamestate/States/MainState.h
	Gamestate/States/SettingsState.h
)
set (GAMESTATE_STATE_SOURCE_FILES
	Gamestate/States/CreditsState.cpp
	Gamestate/States/ExitState.cpp
	Gamestate/States/GameState.cpp
	Gamestate/States/MainState.cpp
	Gamestate/States/SettingsState.cpp
)

set (ENGINE_HEADER_FILES
	Engine/Types.h
	Engine/Engine.h
	Engine/EngineManager.h
)
set (ENGINE_SOURCE_FILES
	Engine/Engine.cpp
	Engine/EngineManager.cpp
)
set (ENGINE_GALAXY_HEADER_FILES
	Engine/galaxy/GalaxyEngine.h
	Engine/galaxy/Sector.h
	Engine/galaxy/Star.h
)
set (ENGINE_GALAXY_SOURCE_FILES
	Engine/galaxy/GalaxyEngine.cpp
	Engine/galaxy/Sector.cpp
	Engine/galaxy/Star.cpp
)

set (ENGINE_HEADER_FILES
	Engine/Types.h
	Engine/Engine.h
	Engine/EngineManager.h
)
set (ENGINE_SOURCE_FILES
	Engine/Engine.cpp
	Engine/EngineManager.cpp
)

set (ACTOR_HEADER_FILES
	Actor/Actor.h
	Actor/NPC.h
	Actor/Player.h
	Actor/ActorConsumer.h
)
set (ACTOR_SOURCE_FILES
	Actor/Actor.cpp
	Actor/Npc.cpp
	Actor/Player.cpp
	Actor/ActorConsumer.cpp
)


source_group (gamestate FILES ${GAMESTATE_HEADER_FILES} ${GAMESTATE_SOURCE_FILES})
source_group (gamestate\\states FILES ${GAMESTATE_STATE_HEADER_FILES} ${GAMESTATE_STATE_SOURCE_FILES})
source_group (engine FILES ${ENGINE_HEADER_FILES} ${ENGINE_SOURCE_FILES})
source_group (engine\\galaxy FILES ${ENGINE_GALAXY_HEADER_FILES} ${ENGINE_GALAXY_SOURCE_FILES})
source_group (actor FILES ${ACTOR_HEADER_FILES} ${ACTOR_SOURCE_FILES})

set (HEADERS
	${HEADER_FILES}
	${GAMESTATE_HEADER_FILES}
	${GAMESTATE_STATE_HEADER_FILES}
	${ENGINE_HEADER_FILES}
	${ENGINE_GALAXY_HEADER_FILES}
	${ACTOR_HEADER_FILES}
)
set (SOURCES
	${SOURCE_FILES}
	${GAMESTATE_SOURCE_FILES}
	${GAMESTATE_STATE_SOURCE_FILES}
	${ENGINE_SOURCE_FILES}
	${ENGINE_GALAXY_SOURCE_FILES}
	${ACTOR_SOURCE_FILES}
)

set (LIBRARIES
	Util
	CoreMediator
	CoreKernel
	CoreInterface
	CoreEntity
)

include_directories (${MPG_SOURCE_DIR})

add_library (Logic STATIC ${HEADERS} ${SOURCES})
#set_target_properties(Logic PROPERTIES VERSION ${MPG_VERSION} SOVERSION ${MPG_VERSION_MAJOR})
#target_link_libraries(Logic ${LIBRARIES})
